import VueRouter from 'vue-router'


//把每个组件引入过来，然后在下面进行path指定进行执行
import HomeContain from './components/tabber/HomeContain.vue'
import MemberContain from './components/tabber/MemberContain.vue'
import SearchContain from './components/tabber/SearchContain.vue'
import ShopcarContain from './components/tabber/ShopcarContain.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photos/photolist.vue'
import PhotoInfo from './components/photos/photoinfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import Goodscomment from './components/goods/Goodscomment.vue'


var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContain},
        {path:'/member',component:MemberContain},
        {path:'/shopcar',component:ShopcarContain},
        {path:'/search',component:SearchContain},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/NewsInfo/:id',component:NewsInfo},
        {path:'/home/photolist',component:PhotoList},
        {path:'/home/photoinfo/:id',component:PhotoInfo},
        {path:'/home/goodslist',component:GoodsList},
        {path:'/home/goodsinfo/:id',component:GoodsInfo,name:'goodsinfo'},
        {path:'/home/goodsdesc/:id',component:GoodsDesc,name:'goDesc'},
        {path:'/home/goodscomment/:id',component:Goodscomment,name:'goComment'},
    ],
    linkActiveClass:'mui-active'//设置高亮，
})

export default router